export const types = [
  ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx', 'renderWord'],
  ['application/msword', 'doc', 'renderWord'],
  ['application/pdf', 'pdf', 'renderPdf'],
  ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx', 'renderExcel'],
  ['application/vnd.ms-excel', 'xls', 'renderExcel'],
  ['image/bmp', 'bmp', '', 'image'],
  ['image/gif', 'gif', '', 'image'],
  ['image/png', 'png', '', 'image'],
  ['image/jpeg', 'jpe', '', 'image'],
  ['image/jpeg', 'jpeg', '', 'image'],
  ['image/jpeg', 'jpg', '', 'image'],
  ['video/x-flv', 'flv', '', 'video'],
  ['video/x-ms-wmv', 'wmv', '', 'video'],
  ['video/x-msvideo', 'avi', '', 'video'],
  ['video/3gpp', '3gp', '', 'video'],
  ['video/quicktime', 'mov', '', 'video'],
  ['video/mp4', 'mp4', '', 'video'],
  // ['text/html', 'htm', ''],
  // ['text/html', 'html', ''],
  // ['video/mpeg', 'mpeg', ''],
  ['text/plain', 'txt', '', 'txt']
  // ['application/javascript', 'js', ''],
  // ['application/json', 'json', ''],
  // ['text/css', 'css', '']
]

import request from '@/utils/request'

export function getFile(url) {
  return request({
    url: `/upload/${url}`,
    method: 'GET',
    responseType: 'blob'
  })
}
